<?php

namespace App\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Sms;

class SmsController extends Controller
{

    /**
     * 显示当前的配置
     * @return mixed
     */
    public function showsms()
    {
        $sms = Sms::find(1);
        return $sms;
    }

    /**
     * 修改阿里云短信配置
     * @param Request $request
     * @return array
     */
    public function putsms(Request $request)
    {
        $sms = Sms::find(1);
//        return $request->input();

        $sms->fill($request->input());
        $sms->save();
        return $this->message('修改成功');
    }

}
